<%-- 
    Document   : updateCache
    Created on : 24.5.2011, 9:19:27
    Author     : Football-Statistics Team
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %>

<f:setLocale value="${pageContext.request.locale}"/>
<f:setBundle basename="labelsBundle" />

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title><f:message key="project_title" /></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <link rel="stylesheet" href="../css/admin.css" />
        <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
        <script type="text/javascript" src="../js/adminmenu.js"></script>
    </head>
    <body>
        <%@include file="adminmenu.jsp" %>  
        <h2><f:message key="cache_update"/></h2>
        <c:if test="${not empty error}">
            <div class="error">
                <c:out value="${error}"/>
            </div>
        </c:if>
        <c:if test="${not empty success}">
            <div class="success">
                <c:out value="${success}"/>
            </div>
        </c:if>         
            <ul id="nav">
                <li><a href="${pageContext.request.contextPath}/administration/clear-cache" target="_self"><f:message key="cache_clear" /></a></li>
                <li><a href="${pageContext.request.contextPath}/administration/update-cache" target="_self"><f:message key="cache_update" /></a></li>
            </ul>        
        <c:import url="XSLT/leagueSelect.xsl" var="xslt"/>
        <f:message key="select_season" var="select_season"/>
        <div class="box">
            <label><f:message key="select_season"/>: </label>
            <x:transform xml="${xml_leagues}" xslt="${xslt}">
                <x:param name="select_season" value="${select_season}"/>
                <x:param name="lid" value="${lid}"/>
                <x:param name="redirect" value="${pageContext.request.contextPath}/administration/update-cache?lid="/>
            </x:transform>
        </div>
        <c:if test="${not empty lid}">
            <form action="${pageContext.request.contextPath}/administration/update-cache" method="post">
                <f:message key="cache_update" var="update"/>
                <input type="hidden" name="lid" value="${lid}"/>
                <input class="loader" id="button" type="submit" value="${update}"/>
                <div id="loader_match">Loading...</div>
            </form>
        </c:if>
    </body>
</html>
